package com.dong.demo.web;

import com.dong.demo.service.DemoService;
import com.dong.mvcframework.annotations.DongAutowired;
import com.dong.mvcframework.annotations.DongController;
import com.dong.mvcframework.annotations.DongRequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@DongController
@DongRequestMapping("/demo")
public class DemoController {

    @DongAutowired private DemoService demoService;

    @DongRequestMapping("/get")
    public String get(HttpServletRequest req, HttpServletResponse resp, String name) {
        return demoService.get(name);
    }
}
